Personalizing Search Results

Discover will enhance existing retail product search engines by adding personalized sorting to bring products specific to the customer's preferences to the top of the search. Customers (logged in or anonymous) with shopping behavior in a digital channel (mobile, or web) will receive these personalized results. Algonomy Discover will strictly be an add-on, not a replacement to the retailer’s existing search engine.

The outcome for Discover’s search integration is a better user experience (relevant products at the top of the search results) for customers and incremental revenue lift and decreased bounce rate for the retailer.

Discover configuration settings apply sitewide. Work with your Algonomy team to choose the best settings for your site, generally, you will find these values through systematic testing of different options.

Personalizing search results is done utilizing the User Profile Service (UPS) data applied to the results of the user's search query.

Algorithm

Personalization of search results occurs in two steps: Indexing time (offline) and Query time (online)

Indexing

Omnichannel Personalization will build a product search index using SOLR technology that contains:

  1. Static catalog information such as product name, title, description, brand, categories, and tags of each product in the catalog feed provided to us by the retailer.

  2. “Wisdom of the crowds” behavioral data.

    1. For example: What are the products people who search for “shoes” view in a session and ultimately purchase across sessions?

This index will be built multiple times of day to ensure new products and spikes in popularity of individual products are captured.

Querying

When a particular customer searches for a term (for example, “LED TV”) we will first retrieve all the information we have for that user in the User Profile Service (UPS). UPS stores user affinities (products, brands, categories) based on the user’s past shopping behavior (views, clicks, likes and purchases).

We will then execute the search query against our SOLR index and apply SOLR’s boosting feature to boost products, brands, and categories with which the customer has an affinity. The results will be a rank ordered set of products that are highly relevant to the search term and personalized to the customer. Since UPS is a real time service we can capture customer behavior as it happens thus ensuring that the search is personalization is also real time.

The customer affinities we return in the API response will be the intersection of global category and brand affinities of that customer with the categories and brands of the products retrieved by the SOLR search engine.

Diagram

Description automatically generated

In the above example, we will boost the Sony and Panasonic products for this customer.

We apply the intersection rule to ensure that search relevance always takes priority over personalization. For example, if the same customer searches for “Samsung TV” we will never respond with Sony TVs even though that customer has viewed or purchased Sony products in the past.

Technical Integration with E-commerce platform

When a customer executes a search on the retailer’s web or mobile site, a request is made to the retailer’s search engine. New code placed inside the search engine will:

  1. Make a request to the Algonomy personalized search API passing the user ID (or session ID) of the customer and the search term.

  2. Omnichannel Personalization will respond with products that are personalized for that user and search term. In addition it will respond with that user’s category and/or brand affinities.

  3. Execute the search query, boosting (see section on API request and response) the categories and brands that the user has an affinity for.

  4. Insert the products returned by Omnichannel Personalization to the top of the search results.

Table

Description automatically generated with low confidence

It is required that the retailer sends Omnichannel Personalization a user ID and/or a session ID to identify the customer performing the search. In the edge case where the Omnichannel Personalization has no information tied to a session ID and/or user ID, we will respond with products that the community of customers on the retailer’s site prefer for the given search term.

API Request and Response

The “recsForPlacements” API will be used to retrieve the personalized products, categories, and brands for the search term. The request will be as follows:

Copy
http://recs.richrelevance.com/rrserver/api/rrPlatform/recsForPlacements?apiKey=apiKey1&apiClientKey=clientKey1&placements=search_page.sort&userId=581d329a2fb274ae1076&sessionId=b9548f4ea5cc7fcaa9cca6f883f238fdb2b9ae0a&filterAtr=region:EU&searchTerm=iphone&ts=635887907359212901&returnMinimalRecItemData=True

The response:

Copy
{
  "placements": [
   {
    "htmlElementId": "search_page_0",
    "placementType": "search_page",
    "strategyMessage": "Sorted search results for you",
    "placement": "search_page.sort",
    "totalItemCount": 130,
    "recommendedProducts": [
     {
      "clickURL": "http://recs.richrelevance.com/rrserver/apiclick?a=apiKey1&cak=clientKey1&ct=http%3A%2F%2Flabs.richrelevance.com%2Fstorre%2Fcatalog%2Fproduct%2Fview%2Fsku%2F23739626&vg=975d5f28-bc39-440f-959b-5853b336af18&stid=165&pti=2&pa=6383&pn=-1&pos=0&p=23739626&channelId=clientKey1&u=test12345",
      "id": "23739626"
     },
     
      "clickURL": "http://recs.richrelevance.com/rrserver/apiclick?a=apiKey1&cak=clientKey1&ct=http%3A%2F%2Flabs.richrelevance.com%2Fstorre%2Fcatalog%2Fproduct%2Fview%2Fsku%2F26011200&vg=975d5f28-bc39-440f-959b-5853b336af18&stid=165&pti=2&pa=6383&pn=-1&pos=1&p=26011200&channelId=clientKey1&u=test12345",
      "id": "26011200"
     }
    ],
    "shopperAffinities":[
     {
       "name":"categoryId",
       "value":"cat1234",
       "type":"category",
       "score":1.234
     },
     {
       "name":"brandId",
       "value":"br1234",
       "type":"brand",
       "score":4.232
     },
     {
       "name":"brandId",
       "value":"br3214",
       "type":"brand",
       "score":9.112
     }
    ]
   }
  ],
  "viewGuid": "975d5f28-bc39-440f-959b-5853b336af18",
  "status": "ok"
}

The “recommendedProducts” attribute will include the list of products. These are the products that should be inserted at the top of the response back to the customer. The “customerAffinities” attribute will contain the list of categories and brands that user has the greatest affinity for.

We recommend the Retailer to insert the products to the top of the list and boost the brands and categories suggested by us.

Here is an example of how you can do this inside SOLR (if that is your search engine):

Copy
q=shoes&fq=-prod_id:(rr_prod1 OR rr_prod2 OR rr_prod3)&bq=rr_catId^affinityVal rr_brandId^affinityVal

The above query:

  1. Searches for "shoes".

  2. Removes the product IDs that Omnichannel Personalization recommended since those products are already being shown at the top.

  3. Applies boosts to the categories or brands that Omnichannel Personalization recommended by the affinity value amount.